package com.javajun.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 * @ClassName: Manager
 * @Description: 班主任实体类
 * @author: xlm
 * @date: 2018年10月12日
 */
@Entity(name="xlm_manager")
public class Manager {

	private Integer id;
	// 教师工号
	private String teaNum;
	// 姓名
	private String name;
	// 性别
	private String sex;
	// 密码
	private String password;
	// 班主任持有班级集合
	private List<Claxx> claxxs = new ArrayList<>();
	
	// SuperClass
	public Manager() {
		super();
	}
	
	// Getters And Setters
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(length=20)
	public String getTeaNum() {
		return teaNum;
	}
	public void setTeaNum(String teaNum) {
		this.teaNum = teaNum;
	}
	@Column(length=20)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(length=20)
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	@OneToMany(fetch=FetchType.LAZY, mappedBy="manager")
	public List<Claxx> getClaxxs() {
		return claxxs;
	}
	public void setClaxxs(List<Claxx> claxxs) {
		this.claxxs = claxxs;
	}

	@Column(length=10)
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	
}
